import './assets/main.less'

import { createApp } from 'vue'
import store from '@/stores'   // store就是做了持久化的pinia对象

import App from './App.vue'
import router from './router/index2'

const app = createApp(App)

app.use(store)  // 挂载pinia对象
app.use(router)


app.mount('#app')

// app是vue的实例化对象
app.directive('auth',{
    mounted(el,binding,vnode){
         // 所有指令渲染完毕
        // 指令初始化完成
        if(!store.state.value.userInfo.permissions.includes(binding.value)) {
            el.remove();      
        }
    }
})
